/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.easoft.code.pos.data.pojos;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Eliu
 */
@Entity
@Table(name = "pos_serie_factura")
@NamedQueries({
    @NamedQuery(name = "PosSerieFactura.findAll", query = "SELECT p FROM PosSerieFactura p"),
    @NamedQuery(name = "PosSerieFactura.findByNoResolucion", query = "SELECT p FROM PosSerieFactura p WHERE p.noResolucion = :noResolucion"),
    @NamedQuery(name = "PosSerieFactura.findByDescripcion", query = "SELECT p FROM PosSerieFactura p WHERE p.descripcion = :descripcion"),
    @NamedQuery(name = "PosSerieFactura.findByNoInicio", query = "SELECT p FROM PosSerieFactura p WHERE p.noInicio = :noInicio"),
    @NamedQuery(name = "PosSerieFactura.findByNoFinal", query = "SELECT p FROM PosSerieFactura p WHERE p.noFinal = :noFinal"),
    @NamedQuery(name = "PosSerieFactura.findBySerie", query = "SELECT p FROM PosSerieFactura p WHERE p.serie = :serie"),
    @NamedQuery(name = "PosSerieFactura.findByEstado", query = "SELECT p FROM PosSerieFactura p WHERE p.estado = :estado"),
    @NamedQuery(name = "PosSerieFactura.findByFechaCreada", query = "SELECT p FROM PosSerieFactura p WHERE p.fechaCreada = :fechaCreada"),
    @NamedQuery(name = "PosSerieFactura.findByFechaFinalizada", query = "SELECT p FROM PosSerieFactura p WHERE p.fechaFinalizada = :fechaFinalizada")})
public class PosSerieFactura implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "no_resolucion", nullable = false, length = 100)
    private String noResolucion;
    @Column(name = "descripcion", length = 45)
    private String descripcion;
    @Basic(optional = false)
    @Column(name = "no_inicio", nullable = false)
    private int noInicio;
    @Basic(optional = false)
    @Column(name = "no_final", nullable = false)
    private int noFinal;
    @Basic(optional = false)
    @Column(name = "serie", nullable = false, length = 100)
    private String serie;
    @Basic(optional = false)
    @Column(name = "estado", nullable = false)
    private int estado;
    @Basic(optional = false)
    @Column(name = "fecha_creada", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaCreada;
    @Column(name = "fecha_finalizada")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaFinalizada;

    public PosSerieFactura() {
    }

    public PosSerieFactura(String noResolucion) {
        this.noResolucion = noResolucion;
    }

    public PosSerieFactura(String noResolucion, int noInicio, int noFinal, String serie, int estado, Date fechaCreada) {
        this.noResolucion = noResolucion;
        this.noInicio = noInicio;
        this.noFinal = noFinal;
        this.serie = serie;
        this.estado = estado;
        this.fechaCreada = fechaCreada;
    }

    public String getNoResolucion() {
        return noResolucion;
    }

    public void setNoResolucion(String noResolucion) {
        this.noResolucion = noResolucion;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public int getNoInicio() {
        return noInicio;
    }

    public void setNoInicio(int noInicio) {
        this.noInicio = noInicio;
    }

    public int getNoFinal() {
        return noFinal;
    }

    public void setNoFinal(int noFinal) {
        this.noFinal = noFinal;
    }

    public String getSerie() {
        return serie;
    }

    public void setSerie(String serie) {
        this.serie = serie;
    }

    public int getEstado() {
        return estado;
    }

    public void setEstado(int estado) {
        this.estado = estado;
    }

    public Date getFechaCreada() {
        return fechaCreada;
    }

    public void setFechaCreada(Date fechaCreada) {
        this.fechaCreada = fechaCreada;
    }

    public Date getFechaFinalizada() {
        return fechaFinalizada;
    }

    public void setFechaFinalizada(Date fechaFinalizada) {
        this.fechaFinalizada = fechaFinalizada;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (noResolucion != null ? noResolucion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PosSerieFactura)) {
            return false;
        }
        PosSerieFactura other = (PosSerieFactura) object;
        if ((this.noResolucion == null && other.noResolucion != null) || (this.noResolucion != null && !this.noResolucion.equals(other.noResolucion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.easoft.code.pos.data.pojos.PosSerieFactura[ noResolucion=" + noResolucion + " ]";
    }

}
